<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

</body>

<script>
// 示例 1: 常量
const a = 10;
// a = 20; // 报错 TypeError: Assignment to constant variable.

// 示例 2: 引用类型
const arr = [1, 2, 3];
arr.push(4); // 允许修改数组的内容
console.log(arr); // 输出 [1, 2, 3, 4]
// arr = [5, 6, 7]; // 报错 TypeError: Assignment to constant variable.

</script>
</html>